package com.example.clientwsphp;


import android.os.Bundle;
import android.app.Activity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class MainActivity extends Activity {

	EditText ingreso;
	TextView egreso;
	Button enviar;
	Controller controller = new Controller();

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		ingreso = (EditText) findViewById(R.id.editText1);
		egreso = (TextView) findViewById(R.id.textView3);
		enviar = (Button) findViewById(R.id.button1);

		enviar.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {

				String galleta = controller.galleta(ingreso.getText().toString());
				egreso.setText(galleta.toString());

			}
		});
	}

}
